package 慕课网.homework5;

//public class Test {
//    public static void main(String[] args) {
//        Earth one=Earth.getInstance();
//        Earth tow=Earth.getInstance();
//        Earth three=Earth.getInstance();
//        one.setName("第一个地球创建。。。。");
//        tow.setName("第二个地球创建。。。。");
//        three.setName("第三个地球创建。。。。");
//        System.out.println(one.getName());
//        System.out.println(tow.getName());
//        System.out.println(three.getName());
//        System.out.println(one);
//        System.out.println(tow);
//        System.out.println(three);
//    }
//}
public class Test {
    public static void main(String[] args) {
        Emperor one=Emperor.getInstance();
        Emperor tow=Emperor.getInstance();
        Emperor three=Emperor.getInstance();
        one.setWorld("创建1号皇帝对象");
        System.out.println(one.getWorld());
        System.out.println(one);
        tow.setWorld("创建2号皇帝对象");
        System.out.println(tow.getWorld());
        System.out.println(tow);
        three.setWorld("创建3号皇帝对象");
        System.out.println(three.getWorld());
        System.out.println(three);
    }
}